import java.util.Scanner;

public class R3 {
     //3.在上一题猜数字的基础上，当游戏结束后，判断用户的等级：	
	//3次以内：“大神”	4-8次： “神人”	8次以上：“小天才”
	/*public static void main(String[] args) {
		double num1=Math.random();
		int a=(int)(num1*100);
		//System.out.println(a);
		Scanner sc = new Scanner(System.in);
		
		int i=0;
		int num=50;
		while (i<= num) {
			i++;
			System.out.println("请输入数字");
			int num2=sc.nextInt();
			if (num2>a) {
				System.out.println("大了");
				continue;
			}else if(num2<a){
				System.out.println("小了");
				continue;
			}else {
				System.out.println("游戏结束");
				break;
			}
		}
		System.out.println("猜数字的次数:"+i);
		if (i>0 && i<= 3) {
			System.out.println("大神");
		}else if (i>3 && i<=8) {
			System.out.println("神人");
		}else{
			System.out.println("小天才");
		}
	}*/
	
	public static void main(String[] args) {
		getD();
	}
	
	public static int getD() {
	int num=(int)(Math.random()*100);
	//System.out.println(num);
	Scanner scanner=new Scanner(System.in);
	int num1=0;
	int t=0;
	while (true) {
		System.out.println("猜数字");
		num1=scanner.nextInt();
		t++;
		if (num1>num) {
			System.out.println("大了");
		}else if (num1<num) {
			System.out.println("小了");
		}else {
			System.out.println("中了");
			break;
		}
	}
	String result="";
	if (t<=3) {
		result="大神";
	}else if (t<=8&&t>=4) {
		result="神人";
	}else {
		result="小天才";
	}
	System.out.println(result+",猜数字的次数:"+t);
	return t;
	}
}
